using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace cs2335.CCT
{
    public interface IComponent
    {
        /// <summary>
        /// Gets or sets the coordinates of the upper-left corner of 
        /// the component relative to the upper-left corner of the CCTForm.
        /// </summary>
        Point Location
        {
            get;
            set;
        }


        /// <summary>
        /// Gets or sets the size and location of the component.
        /// </summary>
        Rectangle Bounds
        {
            get;
            set;
        }


        /// <summary>
        /// Gets or sets the name of the component
        /// </summary>
        string Name
        {
            get;
            set;
        }


        /// <summary>
        /// Gets or sets the font of the text displayed by the component
        /// </summary>
        System.Drawing.Font Font
        {
            get;
            set;
        }


        /// <summary>
        /// Gets or sets the text associated with this Component
        /// </summary>
        string Text
        {
            get;
            set;
        }


        /// <summary>
        /// Gets or sets the Owner that contains this component
        /// </summary>
        CCTForm Owner
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the background color for the component
        /// </summary>
        Color BackColor
        {
            get;
            set;
        }
        




        /// <summary>
        /// Occurs when the component is clicked.
        /// </summary>
        event EventHandler Click;


        /// <summary>
        /// Occurs when the component receives focus.
        /// </summary>
        event EventHandler GotFocus;


        /// <summary>
        /// Occurs when the component loses focus.
        /// </summary>
        event EventHandler LostFocus;


        /// <summary>
        /// Occurs when a key is pressed while the component has focus.
        /// </summary>
        event EventHandler KeyPress;

        /// <summary>
        /// Occurs when a specialkey is pressed while the component has focus.
        /// </summary>
        event EventHandler KeyDown;


        /// <summary>
        /// Occurs when the component is redrawn.
        /// </summary>
        event EventHandler Paint;
        




        /// <summary>
        /// Notifies its CCTForm that it needs a redraw
        /// </summary>
        void Invalidate();


        /// <summary>
        /// Conceals the component from the user.
        /// </summary>
        void Hide();


        /// <summary>
        /// Displays the component to the user.
        /// </summary>
        void Show();




        /// <summary>
        /// Raises the Paint event
        /// </summary>
        /// <param name="e">A PaintEventArgs that contains the event data</param>
        void OnPaint(PaintEventArgs e);


        /// <summary>
        /// Raises the GotFocus event
        /// </summary>
        /// <param name="e">An EventArgs that contains the event data</param>
        void OnGotFocus(EventArgs e);


        /// <summary>
        /// Raises the LostFocus event
        /// </summary>
        /// <param name="e">An EventArgs that contains the event data</param>
        void OnLostFocus(EventArgs e);


        /// <summary>
        /// Called when the mouse is clicked on the component
        /// </summary>
        /// <param name="e">A MouseEventArgs that contains the event data</param>
        void OnMouseClick(System.Windows.Forms.MouseEventArgs e);


        /// <summary>
        /// Called when a key is pressed when the component has focus
        /// </summary>
        /// <param name="e">A KeyPressEventArgs that contains the event data</param>
        void OnKeyPress(System.Windows.Forms.KeyPressEventArgs e);

        /// <summary>
        /// Called when a key is down when the component has focus
        /// </summary>
        /// <param name="e">A KeyEventArgs that contains the event data</param>
        void OnKeyDown(System.Windows.Forms.KeyEventArgs e);
    }
}
